New computer processor technologies include processors with reconfigurable instructions sets. Thus, while the steps performed by each instruction may be the same (but not necessarily) or similar, the representation of those instructions is programmable. This enables these processors with the ability to use the instruction sets for programs having various source languages (FORTRAN, BASIC, C, C++). The use of compilers to generate assembly code (target or object language) from the instruction set of the program code (source language) is well known. A compiler is a computer program that reads a program in one language (source language) and translates it into an equivalent program in another language (assembly, target or object language).
Currently, many optimization techniques, in order to generate assembly code capable of more efficiently executing program routines, are known in the art. U.S. Pat. No. 6,141,742 teaches a plurality of variable length instructions and a method of decoding such. U.S. Pat. No. 6,145,184 teaches an optimization technique involving a plurality of fixed instruction sets from which to choose from. The instruction sets are prioritized based on the memory space and cycle counts needed to perform them. U.S. Pat. No. 5,655,122 teaches optimization of a program by arranging the object code in memory based on branch probabilities, branch frequencies, and function frequencies.
It is also known in the art to utilize Huffman encoding principles for providing bit-symbol representations of data, such as text. In the Huffman system, data symbols that occur with greater frequency are assigned shorter bit patterns to represent them. For example, encoding English text, the letter ‘e’ would be assigned a two-bit symbol and the letter ‘z’ would be assigned a 16-bit symbol. This has proven to reduce transmission and storage requirements over sending a fixed number of bits per symbol (e.g., 7 bits each).
Many of the currently employed optimization techniques use factors, such as memory space occupied and cycle time in determining operational priority. Unfortunately, the currently employed optimization techniques employed fail to provide a method, apparatus, or system for optimization of the instruction sets to be executed, in determining operational priority.
Therefore, it would be desirable to provide a method, apparatus, and system which enable the optimization of the program code to be executed by a processor by applying Huffman-like encoding principles to prioritize the instructions and instruction sets to be used and performed.